﻿using BMS.Enum;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace BMS.DTO
{
    /// <summary>
    /// 用于权限的树形显示
    /// </summary>
    public class PermissionTreeDTO
    {
        /// <summary>
        /// ID
        /// </summary>
        public int Id { get; set; }
        /// <summary>
        /// 父级Id
        /// </summary>
        public int Pid { get; set; }
        /// <summary>
        /// 父级ID集合
        /// </summary>
        public List<int> Pids { get; set; }
        /// <summary>
        /// 标识
        /// </summary>
        public string? Identifier { get; set; }
        /// <summary>
        /// 权限名称
        /// </summary>
        public string? Name { get; set; }
        /// <summary>
        /// vue的路由
        /// </summary>
        public string? UrlPath { get; set; }
        /// <summary>
        /// api的请求路径
        /// </summary>
        public string? ApiAction { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        public string? Icon { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string? Describe { get; set; }
        /// <summary>
        /// 权限的类型
        /// </summary>
        public PermissionCategory Category { get; set; }
        /// <summary>
        /// 排序值，可根据该值控制左侧菜单的显示
        /// </summary>
        public int OrderSort { get; set; } = 0;
        /// <summary>
        /// 状态，0正常1禁用
        /// </summary>
        public int? Status { get; set; }
        /// <summary>
        /// 子项
        /// </summary>
        public List<PermissionTreeDTO> children { get; set; }
    }
}
